package cn.edu.scau.cmi.limingben.composite.model.Consistent_model;

import java.util.List;

public abstract class AbstractOrganization {
	private String name;
	private AbstractOrganization father;

	public AbstractOrganization(String name, AbstractOrganization father) {
		this.name = name;
		this.father = father;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public AbstractOrganization getFather() {
		return father;
	}

	public abstract List<AbstractOrganization> getChildren() throws Exception;

	public abstract void addChild(AbstractOrganization child) throws Exception;

	public abstract void removeChild(AbstractOrganization child) throws Exception;

	@Override
	public String toString() {
		return name;
	}
}
